import TabsDropComponent from '@/components/TabsDropComponent'
import CustomSelect from '@/components/antd-comp/select/CustomSelect'
import InputAntDef from '@/components/input/InputAntDef'
import { useTranslation } from 'react-i18next'
import '../css/styles.css'

/*
SearchList  筛选list
num         选中项
seleCarFun  筛选方法
searchFun   搜索 */
export default function ApplicHeader({ SearchList, num, seleCarFun, searchFun }) {
  const { t } = useTranslation()
  return (
    <div className="flexRowStart flexRowJustBet pageBackColor_callPage_applicationPage px-10 py-5">
      <div className="flexRowStart">
        <TabsDropComponent
          backColor={'#ffffff'}
          style={{ marginRight: '16px' }}
          list={SearchList}
          num={num}
          tabsDropFun={seleCarFun}
        ></TabsDropComponent>
        <InputAntDef
          searchFun={e => {
            searchFun(e, 'searchName')
          }}
          placeholder={t('application.searchName')}
        ></InputAntDef>
      </div>
      <div className="flexRowStart applicationpage_applicHeader_select">
        <CustomSelect
          defaultValue="全部状态"
          style={{ width: '110px' }}
          onChange={e => {
            searchFun(e, 'searchType')
          }}
          options={[
            { value: 2, label: '全部状态 ' },
            { value: 1, label: '上线' },
            { value: 0, label: '下线' }
          ]}
        ></CustomSelect>
      </div>
    </div>
  )
}
